<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 将多个函数组合在一起
    function double(num) {
      return num * 2
    }
    function pow(num) {
      return num ** 2
    }
    // 组合函数
    function foo(num) {
      return pow(double(num))
    }
  </script>
</body>

</html>